<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class NewslettersController extends AppController {

    var $layout = 'default';
    var $uses = array(
        'Newsletter'
    );
    function add(){
        $form   = $this->params['form'];
        $data   =   array(
            'email' =>  $form['email'],
            'ip'    =>  $_SERVER['REMOTE_ADDR'],
        );
        $this->Newsletter->save($data);
        echo '1';
        exit;
    }
}

?>
